const https = require('https');
const fs = require('fs');

const options = {
  key: fs.readFileSync('./chapter04/https/key.pem'),
  cert: fs.readFileSync('./chapter04/https/key-cert.pem')
};

https
  .createServer(options, function (req, res) {
    res.writeHead(200);
    res.end('helol world\n');
  })
  .listen(3000);
